﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HCQ2_Model.VRDD.OutputDto._0806
{
    /// <summary>
    ///  按课程获取作品体验记录
    /// </summary>
    public class OutputRecordCourse: RecordCourse
    {
        /// <summary>
        ///  该课程（包括子目录）下的答题正确率
        /// </summary>
        public decimal record_rate { get; set; }
        /// <summary>
        ///  成绩列表
        /// </summary>
        public List<RecordScoreList> score_list { get; set; }
    }
    public class RecordScoreList: RecordScoreListResult
    {
        /// <summary>
        ///  正确率
        /// </summary>
        public decimal record_rate { get; set; }
        /// <summary>
        ///  缩略图
        /// </summary>
        public List<T_DocBagFileRecord> photoOption { get; set; }
    }

    /// <summary>
    ///  体验记录
    /// </summary>
    public class RecordCourse
    {
        /// <summary>
        ///  课程id
        /// </summary>
        public int folder_id { get; set; }
        /// <summary>
        ///  课程名称
        /// </summary>
        public string folder_name { get; set; }
        /// <summary>
        ///  课程简介
        /// </summary>
        public string folder_note { get; set; }
        /// <summary>
        ///  课程缩略图
        /// </summary>
        public string folder_url { get; set; }
        /// <summary>
        ///  path
        /// </summary>
        public string folder_path { get; set; }
        /// <summary>
        ///  该课程（包括子目录）下的作品总数
        /// </summary>
        public int work_num { get; set; }
        /// <summary>
        ///  该课程（包括子目录）下有体验记录的作品数合计
        /// </summary>
        public int record_work_num { get; set; }
        /// <summary>
        ///  该课程（包括子目录）下的作品体验次数合计
        /// </summary>
        public int record_num { get; set; }
        /// <summary>
        ///  该课程（包括子目录）下的作品体验时长合计
        /// </summary>
        public int record_time { get; set; }
        /// <summary>
        ///  正确数
        /// </summary>
        public int ok_num { get; set; }
        /// <summary>
        ///  错误数
        /// </summary>
        public int error_num { get; set; }     
        public OutputRecordCourse ToOutputRecordCourse()
        {
            return new OutputRecordCourse
            {
                folder_id = this.folder_id,
                folder_name = this.folder_name,
                folder_note = this.folder_note,
                folder_url = this.folder_url,
                work_num = this.work_num,
                record_work_num = this.record_work_num,
                record_num = this.record_num,
                record_time = this.record_time,
                ok_num = this.ok_num,
                error_num = this.error_num
            };
        }
    }
    /// <summary>
    ///  成绩列表
    /// </summary>
    public class RecordScoreListResult
    {
        /// <summary>
        ///  作品id
        /// </summary>
        public int file_id { get; set; }
        /// <summary>
        ///  作品名称
        /// </summary>
        public string file_name { get; set; }
        /// <summary>
        ///  作品简介
        /// </summary>
        public string file_note { get; set; }
        /// <summary>
        ///  所属目录id
        /// </summary>
        public int folder_id { get; set; }
        /// <summary>
        ///  所属目录名称
        /// </summary>
        public string folder_name { get; set; }
        /// <summary>
        ///  最近体验开始时间
        /// </summary>
        public string in_date { get; set; }
        /// <summary>
        ///  体验次数
        /// </summary>
        public int trial_num { get; set; }
        /// <summary>
        ///  体验时长合计
        /// </summary>
        public int em_time { get; set; }
        /// <summary>
        ///  总得分
        /// </summary>
        public decimal total_score { get; set; }
        /// <summary>
        ///  正确数
        /// </summary>
        public int result_ok { get; set; }
        /// <summary>
        ///  错误数
        /// </summary>
        public int result_error { get; set; }
        public RecordScoreList ToRecordScoreList()
        {
            return new RecordScoreList {
                file_id=this.file_id,
                file_name=this.file_name,
                file_note=this.file_note,
                folder_id=this.folder_id,
                folder_name=this.folder_name,
                in_date=this.in_date,
                trial_num=this.trial_num,
                em_time=this.em_time,
                total_score=this.total_score,
                result_ok=this.result_ok,
                result_error=this.result_error
            };
        }
    }
}